package com.java.java8.util.functioninterfacedemo;

import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @author liyanhao
 * @Date 2023-03-27 9:26
 */
public class MaxByMinByDemo {
    public static void main(String[] args) {
        Student s1 = new Student("Shyam", 22, "A");
        Student s2 = new Student("Ram", 23, "A");
        Student s3 = new Student("Mohan", 22, "B");
        Student s4 = new Student("Ramesh", 21, "B");
        Student[] aa = new Student[]{s1, s2, s3, s4};
        List<Student> students = Arrays.stream(aa).collect(Collectors.toList());
        Comparator<Student> comparing = Comparator.comparing(Student::getAge);
        System.out.println("---BinaryOperator.minBy---");


    }
}
